#pragma once

#include "Common.h"
#include "Texture2D.h"
#include "ContentManager.h"

#define TEXTUREMANAGER_DEFAULT_ROOTDIRECTORY	"Textures/"
#define TEXTUREMANAGER_MAXIMUM_MEMORYUSAGE		134217728

class TextureManager
{
private:
	TextureManager();
public:
	~TextureManager();
public:
	static void	LoadContent();
	static void Initialize();
	static void UnloadContent();
public:
	static String GetRootDirectory() { return m_sRootDirectory; }
	static unsigned int GetMemoryUsage() { return m_nMemoryUsage; }
	static unsigned int GetTextureCount() { return m_pTextures.size(); }
public:
	void SetRootDirectory(String rootDirectory);
public:
	static Texture2D* Load(String path);
	static void Unload(Texture2D* texture);
private:
	static Texture2D* LoadBlp(String path);
private:
	static String m_sRootDirectory;
	static unsigned int m_nMemoryUsage;
	static std::list<Texture2D*> m_pTextures;
};
